package com.ccm.demo.springbootsecurity.configuration;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

@Configuration
public class InterceptorConfig extends WebMvcConfigurerAdapter {


	@Override
	public void addInterceptors(InterceptorRegistry registry) {

	}

	@Override
	public void addCorsMappings(CorsRegistry registry) {
//		registry.addMapping("/**")
//				.allowedHeaders("*")
//				.allowedMethods("GET","POST","OPTIONS")
//				.allowedOrigins("*")
//				.exposedHeaders("access-control-allow-headers",
//						"access-control-allow-methods",
//						"access-control-allow-origin",
//						"access-control-max-age",
//						"X-Frame-Options")
//				.allowCredentials(true)
//				.maxAge(3600);
	}

}
